﻿<!DOCTYPE html>
<html>
<head>
    <title>CGI</title>
</head>
<body>
    <h1>Our Page</h1>

    <script>
        //01
        var value = 'My String';
        console.log(value.charAt(3));

        //var value = 'My String';
        //console.log(value.concat(' Lives!'));

        //var value = 'My String';
        //console.log(value.includes(' '));

        //var value = 'My String';
        //console.log(value.endsWith('ing'));

        //var value = 'My String';
        //console.log(value.indexOf('M'));

        //var value = 'My String';
        //console.log(value.indexOf('Z'));

        //var value = 'Some String';
        //console.log(value.lastIndexOf('S'));

        ////slice of a string starts at index 5
        //var value = 'Some String';
        //console.log(value.slice(5));

        ////slice starts at 5 and upto 8 and not 8 index
        //var value = 'Some String';
        //console.log(value.slice(5, 8));

        ////look from end of string
        //var value = 'Some String';
        //console.log(value.slice(-3));

        //var value = 'Some String';
        //console.log(value.split(' ').length);

        //var value = 'Some String';
        //console.log(value.substring(5, 6));
        //console.log(value.substr(5, 6));

       
    </script>
</body>
</html>